import axios from 'axios'

const axiosInstance = axios.create({
  baseURL: 'http://192.168.0.10:9530',
  timeout: 1000 * 30,
  headers: {
    'Content-Type': 'application/json;charset=UTF-8'
  }
})
//请求拦截器
axiosInstance.interceptors.request.use(
  (config) => {
    return config
  },
  (error) => {
    Promise.reject(error)
  }
)
//响应拦截器
axiosInstance.interceptors.response.use(
  function (res) {
    return res
  },
  function (error) {
    return Promise.reject(error)
  }
)

export default axiosInstance
